package org.dtrd.modules.archive.entity.bean.lifeway;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.modules.archive.entity.bean.LifewayDTO;
import org.dtrd.modules.archive.entity.po.DtrdEntRdArchiveLifeway;

/**
 * @author : qiannai
 * @date: 2022/8/11 16:10
 * @describe : 生活方式饮酒情况保存
 */
@Data
@ApiModel(value = "饮酒情况", description = "饮酒情况表单")
public class LifewayDrinkingDTO {

    private Integer dataId;

    @ApiModelProperty("患者ID")
    private Integer patientId;

    @ApiModelProperty("喝酒频率: 1-饮酒史,2-每周<=两次,3- 每周>2次")
    private Integer drinkingFrequency;

    @ApiModelProperty("多久喝一次酒DR2")
    private Integer drinkingTimes;

    @ApiModelProperty("啤酒饮量DR3")
    private Integer drinkingBeer;

    @ApiModelProperty("白酒饮量DR4")
    private Integer drinkingBaijiu;

    @ApiModelProperty("黄酒饮量DR5")
    private Integer drinkingYellowWine;

    @ApiModelProperty("葡萄酒饮量DR6")
    private Integer drinkingWine;

    @ApiModelProperty("饮酒情况评分DR")
    private Integer drinkingHabitsScore;

    @ApiModelProperty("饮酒情况小结DR")
    private String drinkingHabitsComment;

    public LifewayDrinkingDTO parseFromPo(DtrdEntRdArchiveLifeway po){
        dataId = po.getDataId();
        patientId = po.getPatientId();
        drinkingFrequency = po.getDrinkingFrequency();
        drinkingTimes = po.getDrinkingTimes();
        drinkingBeer = po.getDrinkingBeer();
        drinkingBaijiu = po.getDrinkingBaijiu();
        drinkingYellowWine = po.getDrinkingYellowWine();
        drinkingWine = po.getDrinkingWine();
        drinkingHabitsScore = po.getDrinkingHabitsScore();
        drinkingHabitsComment = po.getDrinkingHabitsComment();
        return this;
    }
}
